<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="renderer" content="webkit">
<link rel="stylesheet" href="./amazeui.min.css"/>
<link rel="stylesheet" href="./markdown-palettes.css">
<link rel="stylesheet" href="./katex.min.css" integrity="sha384-n8MVd4RsNIU0tAv4ct0nTaAbDJwPJzDEaqSD1odI+WdtXRGWt2kTvGFasHpSy3SV" crossorigin="anonymous">
</head>
<body>
<p><strong>转载请在文章页面明显位置注明出处。</strong><br/>
PS：资料来源于 Wiki，凑合着看吧，不过洛谷的 LaTeX 对有些符号或功能并不支持，我就没有打上。<br/>
本文纯手打。<br/>
排版不好，见谅。<br/>
Update 2018/6/5：最近重新在 Wiki 上搜了下，悲催的发现我做来源的页面是古老版本……，现在的页面将这些符号大多重分类，也就是说我要重构整篇文章……（哭<br/>
Update 2018/6/20：最近发现一个式子可以使用背景颜色，然而 Wiki 上并没有 QAQ。顺便将不同类别用分割线隔了下。<br/>
Update 2018/6/24：在打题解的时候突然发现在洛谷的 LaTeX 里还是可以插入中文的，所以就加了下，见字体一栏。<br/>
Update 2019/3/6：在用 LaTeX 写题解的时候想起现在数学公式里的多行等式的语法是有变化的，而 Wiki 上的是老语法，所以无法使用，因此用新语法还是可以在洛谷上使用多行等式的，同时添加了一种字体、关于插入数学公式的语法、给数学公式加上方框的公式、矩阵嵌套以及一个特殊字符，修改了一些介绍、标题。<br/>
另外吐槽一句，现在这篇博客的修改界面真的超级卡。。打一字响应半天。。<br/>
Update 2019/4/22：修正两个小错误，感谢 @wjyyy 和 @Struct瓶子 指出错误。<br/>
Update 2019/6/23：修正命令 <code>\not</code> 的使用，也许是我以前搞错语法了，反正现在是能正常使用的，感谢 @wxwoo 提醒了我检查该命令。<br/>
Update 2019/6/29：应 @star_city 的要求，添加了可在其上写文字的箭头命令。  </p>
<p><a href="https://www.luogu.org/blog/IowaBattleship/latex-ru-men">LaTeX 入门</a></p>
<hr/>
<h3>数学公式的插入</h3>
<p>将数学公式写在 <code>$ $</code> 之间，代表的是插入行内数学公式（通常称为行内模式）。<br/>
将数学公式写在 <code>$$ $$</code> 之间，会使公式独立成一行并强制居中（通常称为独立模式）。</p>
<hr/>
<h3>声调 / 变音符号</h3>
<pre><code class="language-markdown">$\dot{a} \ddot{a} \acute{a} \grave{a}$</code></pre>
<p>$\quad\dot{a}\quad\ddot{a}\quad\acute{a}\quad\grave{a}$</p>
<pre><code class="language-markdown">$\check{a} \breve{a} \tilde{a} \bar{a}$</code></pre>
<p>$\quad\check{a}\quad\breve{a}\quad\tilde{a}\quad\bar{a}$</p>
<pre><code class="language-markdown">$\hat{a} \widehat{a} \vec{a}$</code></pre>
<p>$\quad\hat{a}\quad\widehat{a}\quad\vec{a}$</p>
<hr/>
<h3>标准函数</h3>
<pre><code class="language-markdown">$\exp_a b=a^b \exp b=e^b 10^m$</code></pre>
<p>$\quad\exp_a b=a^b\quad\exp b=e^b\quad10^m$</p>
<pre><code class="language-markdown">$\sin a \cos b \tan c \sec d \csc e \cot f$</code></pre>
<p>$\quad\sin a\quad\cos b\quad\tan c\quad\sec d\quad\csc e\quad\cot f$</p>
<pre><code class="language-markdown">$\arcsin a \arccos b \arctan c$</code></pre>
<p>$\quad\arcsin a\quad\arccos b\quad\arctan c$</p>
<pre><code class="language-markdown">$\sinh a \cosh b \tanh c \coth d$</code></pre>
<p>$\quad\sinh a\quad\cosh b\quad\tanh c\quad\coth d$</p>
<pre><code class="language-markdown">$\sh a \ch b \th c$</code></pre>
<p>$\quad\sh a\quad\ch b\quad\th c$</p>
<pre><code class="language-markdown">$\operatorname{argsh} a \operatorname{argch} b \operatorname{argth} c$</code></pre>
<p>PS：<code>\operatorname{}</code> 貌似可以将任何字符转换成标准函数的形式。</p>
<p>$\quad\operatorname{argsh} a\quad\operatorname{argch} b\quad\operatorname{argth} c$</p>
<pre><code class="language-markdown">$\left\vert a\right\vert \min(x,y) \max(x,y)$</code></pre>
<p>$\quad\left\vert a\right\vert\quad\min(x,y)\quad\max(x,y)$</p>
<hr/>
<h3>界限</h3>
<pre><code class="language-markdown">$\min x \max y \inf s \sup t$</code></pre>
<p>$\quad\min x\quad\max y\quad\inf s\quad\sup t$</p>
<pre><code class="language-markdown">$\lim u \liminf v \limsup w$</code></pre>
<p>$\quad\lim u\quad\liminf v\quad\limsup w$</p>
<pre><code class="language-markdown">$\dim p \deg q \det m \ker\phi$</code></pre>
<p>$\quad\dim p\quad\deg q\quad\det m\quad\ker\phi$</p>
<hr/>
<h3>投射</h3>
<p>PS：感觉这翻译很奇怪，应该是映射吧。</p>
<pre><code class="language-markdown">$\Pr j \hom l \lVert z\rVert \arg z$</code></pre>
<p>PS：个人认为 <code>\lVert</code>、<code>\rVert</code> 与 <code>\Vert</code> 和 <code>\|</code> 并没有什么区别。</p>
<p>$\quad\Pr j\quad\hom l\quad\lVert z\rVert\quad\arg z$  </p>
<hr/>
<h3>微分及导数</h3>
<pre><code class="language-markdown">$dt \mathrm{d}t \partial t \nabla\psi$</code></pre>
<p>$\quad dt\quad\mathrm{d}t\quad\partial t\quad\nabla\psi$</p>
<pre><code class="language-markdown">$\prime \backprime f^\prime f' f'' f^{(3)} \dot{y} \ddot{y}$</code></pre>
<p>$\quad\prime\quad\backprime\quad f^\prime\quad f'\quad f''\quad f^{(3)}\quad\dot{y}\quad\ddot{y}$</p>
<hr/>
<h3>类字母符号及常数</h3>
<pre><code class="language-markdown">$\infty \aleph \complement \backepsilon \eth \Finv \hbar$</code></pre>
<p>$\quad\infty\quad\aleph\quad\complement\quad\backepsilon\quad\eth\quad\Finv\quad\hbar$</p>
<pre><code class="language-markdown">$\Im \imath \jmath \Bbbk \ell \mho \wp \Re \circledS$</code></pre>
<p>$\quad\Im\quad\imath\quad\jmath\quad\Bbbk\quad\ell\quad\mho\quad\wp\quad\Re\quad\circledS$</p>
<hr/>
<h3>模算数</h3>
<pre><code class="language-markdown">$a\equiv1\pmod{m}$</code></pre>
<p>$\quad a\equiv1\pmod{m}$</p>
<pre><code class="language-markdown">$a\bmod b$</code></pre>
<p>$\quad a\bmod b$</p>
<pre><code class="language-markdown">$\gcd(m,n) \operatorname{lcm}(m,n)$</code></pre>
<p>$\quad\gcd(m,n)\quad\operatorname{lcm}(m,n)$</p>
<pre><code class="language-markdown">$\mid \nmid \shortmid \nshortmid$</code></pre>
<p>PS：<code>\mid</code> 可以用 <code>|</code> 代替。（管理员注：<code>\mid</code> 实际上差不多是 <code>\mathrel{|}</code>，两侧的 spacing 有区别的）</p>
<p>$\quad\mid\quad\nmid\quad\shortmid\quad\nshortmid$</p>
<pre><code class="language-markdown">$a\%b$</code></pre>
<p>$\quad a\%b$</p>
<p>（管理员注：不建议在公式中使用 <code>\%</code> 作为取模，一般仅作百分号使用）</p>
<hr/>
<h3>根号</h3>
<pre><code class="language-markdown">$\surd \sqrt{2} \sqrt[n]{} \sqrt[n]{x}$</code></pre>
<p>$\quad\surd\quad\sqrt{2}\quad\sqrt[n]{}\quad\sqrt[n]{x}$  </p>
<hr/>
<h3>运算符</h3>
<pre><code class="language-markdown">$+ - \pm \mp \dotplus$</code></pre>
<p>$\quad+\quad-\quad\pm\quad\mp\quad\dotplus$</p>
<pre><code class="language-markdown">$\times \div \divideontimes / \backslash$</code></pre>
<p>$\quad\times\quad\div\quad\divideontimes\quad/\quad\backslash$</p>
<pre><code class="language-markdown">$\cdot * \star \circ \bullet$</code></pre>
<p>PS：<code>*</code> 可以用 <code>\ast</code> 代替。</p>
<p>$\quad\cdot\quad*\quad\star\quad\circ\quad\bullet$</p>
<pre><code class="language-markdown">$\boxplus \boxminus \boxtimes \boxdot$</code></pre>
<p>$\quad\boxplus\quad\boxminus\quad\boxtimes\quad\boxdot$</p>
<pre><code class="language-markdown">$\oplus \ominus \otimes \oslash \odot$</code></pre>
<p>$\quad\oplus\quad\ominus\quad\otimes\quad\oslash\quad\odot$</p>
<pre><code class="language-markdown">$\circleddash \circledcirc \circledast$</code></pre>
<p>$\quad\circleddash\quad\circledcirc\quad\circledast$</p>
<pre><code class="language-markdown">$\bigoplus \bigotimes \bigodot$</code></pre>
<p>$\quad\bigoplus\quad\bigotimes\quad\bigodot$</p>
<hr/>
<h3>集合</h3>
<pre><code class="language-markdown">$\{ \} \emptyset \varnothing$</code></pre>
<p>$\quad\{\quad\}\quad\emptyset\quad\varnothing$</p>
<pre><code class="language-markdown">$\in \notin \not\in \ni \not\ni$</code></pre>
<p>PS：<code>\not</code> 是在下一个字符上画斜杠。</p>
<p>$\quad\in\quad\notin\quad\not\in\quad\ni\quad\not\ni$</p>
<pre><code class="language-markdown">$\cap \Cap \sqcap \bigcap$</code></pre>
<p>$\quad\cap\quad\Cap\quad\sqcap\quad\bigcap$</p>
<pre><code class="language-markdown">$\cup \Cup \sqcup \bigcup \bigsqcup \uplus \biguplus$</code></pre>
<p>$\quad\cup\quad\Cup\quad\sqcup\quad\bigcup\quad\bigsqcup\quad\uplus\quad\biguplus$</p>
<pre><code class="language-markdown">$\setminus \smallsetminus \times$</code></pre>
<p>$\quad\setminus\quad\smallsetminus\quad\times$</p>
<pre><code class="language-markdown">$\subset \Subset \sqsubset$</code></pre>
<p>$\quad\subset\quad\Subset\quad\sqsubset$</p>
<pre><code class="language-markdown">$\supset \Supset \sqsupset$</code></pre>
<p>$\quad\supset\quad\Supset\quad\sqsupset$</p>
<pre><code class="language-markdown">$\subseteq \nsubseteq \subsetneq \varsubsetneq \sqsubseteq$</code></pre>
<p>$\quad\subseteq\quad\nsubseteq\quad\subsetneq\quad\varsubsetneq\quad\sqsubseteq$</p>
<pre><code class="language-markdown">$\supseteq \nsupseteq \supsetneq \varsupsetneq \sqsupseteq$</code></pre>
<p>$\quad\supseteq\quad\nsupseteq\quad\supsetneq\quad\varsupsetneq\quad\sqsupseteq$</p>
<pre><code class="language-markdown">$\subseteqq \nsubseteqq \subsetneqq \varsubsetneqq$</code></pre>
<p>$\quad\subseteqq\quad\nsubseteqq\quad\subsetneqq\quad\varsubsetneqq$</p>
<pre><code class="language-markdown">$\supseteqq \nsupseteqq \supsetneqq \varsupsetneqq$</code></pre>
<p>$\quad\supseteqq\quad\nsupseteqq\quad\supsetneqq\quad\varsupsetneqq$</p>
<hr/>
<h3>关系符号</h3>
<pre><code class="language-markdown">$= \ne \neq \equiv \not\equiv$</code></pre>
<p>PS：表示并没有看出来 <code>\ne</code> 和 <code>\neq</code> 的区别……（管理员注：因为是一样的）</p>
<p>$\quad=\quad\ne\quad\neq\quad\equiv\quad\not\equiv$</p>
<pre><code class="language-markdown">$\doteq \doteqdot \overset{\underset{def}{}}{=} :=$</code></pre>
<p>$\quad\doteq\quad\doteqdot\quad\overset{\underset{def}{}}{=}\quad:=$</p>
<pre><code class="language-markdown">$\sim \nsim \backsim \thicksim \simeq \backsimeq \eqsim \cong \ncong$</code></pre>
<p>$\quad\sim\quad\nsim\quad\backsim\quad\thicksim\quad\simeq\quad\backsimeq\quad\eqsim\quad\cong\quad\ncong$</p>
<pre><code class="language-markdown">$\approx \thickapprox \approxeq \asymp \propto \varpropto$</code></pre>
<p>$\quad\approx\quad\thickapprox\quad\approxeq\quad\asymp\quad\propto\quad\varpropto$</p>
<pre><code class="language-markdown">$&lt; \nless \ll \not\ll \lll \not\lll \lessdot$</code></pre>
<p>$\quad&lt;\quad\nless\quad\ll\quad \not\ll\quad\lll\quad \not\lll\quad\lessdot$</p>
<pre><code class="language-markdown">$&gt; \ngtr \gg \not\gg \ggg \not\ggg \gtrdot$</code></pre>
<p>$\quad&gt;\quad\ngtr\quad\gg\quad \not\gg\quad\ggg\quad \not\ggg\quad\gtrdot$</p>
<pre><code class="language-markdown">$\le \leq \lneq \leqq \nleq \nleqq \lneqq \lvertneqq$</code></pre>
<p>$\quad\le\quad\leq\quad\lneq\quad\leqq\quad\nleq\quad\nleqq\quad\lneqq\quad\lvertneqq$</p>
<pre><code class="language-markdown">$\ge \geq \gneq \geqq \ngeq \ngeqq \gneqq \gvertneqq$</code></pre>
<p>$\quad\ge\quad\geq\quad\gneq\quad\geqq\quad\ngeq\quad\ngeqq\quad\gneqq\quad\gvertneqq$</p>
<pre><code class="language-markdown">$\lessgtr \lesseqgtr \lesseqqgtr \gtrless \gtreqless \gtreqqless$</code></pre>
<p>$\quad\lessgtr\quad\lesseqgtr\quad\lesseqqgtr\quad\gtrless\quad\gtreqless\quad\gtreqqless$</p>
<pre><code class="language-markdown">$\leqslant \nleqslant \eqslantless$</code></pre>
<p>$\quad\leqslant\quad\nleqslant\quad\eqslantless$</p>
<pre><code class="language-markdown">$\geqslant \ngeqslant \eqslantgtr$</code></pre>
<p>$\quad\geqslant\quad\ngeqslant\quad\eqslantgtr$</p>
<pre><code class="language-markdown">$\lesssim \lnsim \lessapprox \lnapprox$</code></pre>
<p>$\quad\lesssim\quad\lnsim\quad\lessapprox\quad\lnapprox$</p>
<pre><code class="language-markdown">$\gtrsim \gnsim \gtrapprox \gnapprox$</code></pre>
<p>$\quad\gtrsim\quad\gnsim\quad\gtrapprox\quad\gnapprox$</p>
<pre><code class="language-markdown">$\prec \nprec \preceq \npreceq \precneqq$</code></pre>
<p>$\quad\prec\quad\nprec\quad\preceq\quad\npreceq\quad\precneqq$</p>
<pre><code class="language-markdown">$\succ \nsucc \succeq \nsucceq \succneqq$</code></pre>
<p>$\quad\succ\quad\nsucc\quad\succeq\quad\nsucceq\quad\succneqq$</p>
<pre><code class="language-markdown">$\preccurlyeq \curlyeqprec$</code></pre>
<p>$\quad\preccurlyeq\quad\curlyeqprec$</p>
<pre><code class="language-markdown">$\succcurlyeq \curlyeqsucc$</code></pre>
<p>$\quad\succcurlyeq\quad\curlyeqsucc$</p>
<pre><code class="language-markdown">$\precsim \precnsim \precapprox \precnapprox$</code></pre>
<p>$\quad\precsim\quad\precnsim\quad\precapprox\quad\precnapprox$</p>
<pre><code class="language-markdown">$\succsim \succnsim \succapprox \succnapprox$</code></pre>
<p>$\quad\succsim\quad\succnsim\quad\succapprox\quad\succnapprox$</p>
<hr/>
<h3>几何符号</h3>
<pre><code class="language-cpp">$\parallel \nparallel \shortparallel \nshortparallel$
 ps:\parallel应该和\|是一样的。</code></pre>
<p>$\quad\parallel\quad\nparallel\quad\shortparallel\quad\nshortparallel$  </p>
<pre><code class="language-cpp">$\perp \angle \sphericalangle \measuredangle 45^\circ$</code></pre>
<p>$\quad\perp\quad\angle\quad\sphericalangle\quad\measuredangle\quad45^\circ$  </p>
<pre><code class="language-cpp">$\Box \blacksquare \diamond \Diamond \lozenge \blacklozenge \bigstar$</code></pre>
<p>$\quad\Box\quad\blacksquare\quad\diamond\quad\Diamond\quad\lozenge\quad\blacklozenge\quad\bigstar$  </p>
<pre><code class="language-cpp">$\bigcirc \triangle \bigtriangleup \bigtriangledown$
 ps:并没有看出\triangle和\bigtriangleup有什么区别。</code></pre>
<p>$\quad\bigcirc\quad\triangle\quad\bigtriangleup\quad\bigtriangledown$  </p>
<pre><code class="language-cpp">$\vartriangle \triangledown \triangleleft \triangleright$</code></pre>
<p>$\quad\vartriangle\quad\triangledown\quad\triangleleft\quad\triangleright$  </p>
<pre><code class="language-cpp">$\blacktriangle \blacktriangledown \blacktriangleleft \blacktriangleright$</code></pre>
<p>$\quad\blacktriangle\quad\blacktriangledown\quad\blacktriangleleft\quad\blacktriangleright$  </p>
<hr/>
<h3>逻辑符号</h3>
<pre><code class="language-cpp">$\forall \exists \nexists$</code></pre>
<p>$\quad\forall\quad\exists\quad\nexists$  </p>
<pre><code class="language-cpp">$\therefore \because \And$
 ps:\And也可用\&amp;，至少我没看出来这两个有什么差别。</code></pre>
<p>$\quad\therefore\quad\because\quad\And$  </p>
<pre><code class="language-cpp">$\lor \vee \curlyvee \bigvee$</code></pre>
<p>$\quad\lor\quad\vee\quad\curlyvee\quad\bigvee$  </p>
<pre><code class="language-cpp">$\land \wedge \curlywedge \bigwedge$</code></pre>
<p>$\quad\land\quad\wedge\quad\curlywedge\quad\bigwedge$  </p>
<pre><code class="language-cpp">$\bar{q} \bar{abc} \overline{q} \overline{abc}$</code></pre>
<p>$\quad\bar{q}\quad\bar{abc}\quad\overline{q}\quad\overline{abc}$  </p>
<pre><code class="language-cpp">$\lnot \neg \bot \top$</code></pre>
<p>$\quad\lnot\quad\neg\quad\bot\quad\top$  </p>
<pre><code class="language-cpp">$\vdash \dashv \vDash \Vdash \models$</code></pre>
<p>$\quad\vdash\quad\dashv\quad\vDash\quad\Vdash\quad\models$  </p>
<pre><code class="language-cpp">$\Vvdash \nvdash \nVdash \nvDash \nVDash$</code></pre>
<p>$\quad\Vvdash\quad\nvdash\quad\nVdash\quad\nvDash\quad\nVDash$  </p>
<pre><code class="language-cpp">$\ulcorner \urcorner \llcorner \lrcorner$</code></pre>
<p>$\quad\ulcorner\quad\urcorner\quad\llcorner\quad\lrcorner$  </p>
<hr/>
<h3>箭头</h3>
<pre><code class="language-cpp">$\Rrightarrow \Lleftarrow$</code></pre>
<p>$\quad\Rrightarrow\quad\Lleftarrow$  </p>
<pre><code class="language-cpp">$\Rightarrow \nRightarrow \Longrightarrow \implies$</code></pre>
<p>$\quad\Rightarrow\quad\nRightarrow\quad\Longrightarrow\quad\implies$  </p>
<pre><code class="language-cpp">$\Leftarrow \nLeftarrow \Longleftarrow$</code></pre>
<p>$\quad\Leftarrow\quad\nLeftarrow\quad\Longleftarrow$  </p>
<pre><code class="language-cpp">$\Leftrightarrow \nLeftrightarrow \Longleftrightarrow \iff$</code></pre>
<p>$\quad\Leftrightarrow\quad\nLeftrightarrow\quad\Longleftrightarrow\quad\iff$  </p>
<pre><code class="language-cpp">$\Uparrow \Downarrow \Updownarrow$</code></pre>
<p>$\quad\Uparrow\quad\Downarrow\quad\Updownarrow$  </p>
<pre><code class="language-cpp">$\leftarrow \rightarrow \nleftarrow \nrightarrow \leftrightarrow \nleftrightarrow \longleftarrow \longrightarrow \longleftrightarrow$
 ps:\leftarrow可用\gets代替，\rightarrow可用\to代替。</code></pre>
<p>$\quad\leftarrow\quad\rightarrow\quad\nleftarrow\quad\nrightarrow\quad\leftrightarrow\quad\nleftrightarrow\quad\longleftarrow\quad\longrightarrow\quad\longleftrightarrow$  </p>
<pre><code class="language-cpp">$\uparrow \downarrow \updownarrow \nearrow \searrow \nwarrow \swarrow$</code></pre>
<p>$\quad\uparrow\quad\downarrow\quad\updownarrow\quad\nearrow\quad\searrow\quad\nwarrow\quad\swarrow$  </p>
<pre><code class="language-cpp">$\mapsto \longmapsto$</code></pre>
<p>$\quad\mapsto\quad\longmapsto$  </p>
<pre><code class="language-cpp">$\rightharpoonup \rightharpoondown \leftharpoonup \leftharpoondown \upharpoonleft \upharpoonright \downharpoonleft \downharpoonright \leftrightharpoons \rightleftharpoons$</code></pre>
<p>$\quad\rightharpoonup\quad\rightharpoondown\quad\leftharpoonup\quad\leftharpoondown\quad\upharpoonleft\quad\upharpoonright\quad\downharpoonleft\quad\downharpoonright\quad\leftrightharpoons\quad\rightleftharpoons$  </p>
<pre><code class="language-cpp">$\curvearrowleft \circlearrowleft \Lsh \upuparrows \rightrightarrows \rightleftarrows \rightarrowtail \looparrowright$</code></pre>
<p>$\quad\curvearrowleft\quad\circlearrowleft\quad\Lsh\quad\upuparrows\quad\rightrightarrows\quad\rightleftarrows\quad\rightarrowtail\quad\looparrowright$  </p>
<pre><code class="language-cpp">$\curvearrowright \circlearrowright \Rsh \downdownarrows \leftleftarrows \leftrightarrows \leftarrowtail \looparrowleft$</code></pre>
<p>$\quad\curvearrowright\quad\circlearrowright\quad\Rsh\quad\downdownarrows\quad\leftleftarrows\quad\leftrightarrows\quad\leftarrowtail\quad\looparrowleft$  </p>
<pre><code class="language-cpp">$\hookrightarrow \hookleftarrow \multimap \leftrightsquigarrow \rightsquigarrow \twoheadrightarrow \twoheadleftarrow$</code></pre>
<p>$\quad\hookrightarrow\quad\hookleftarrow\quad\multimap\quad\leftrightsquigarrow\quad\rightsquigarrow\quad\twoheadrightarrow\quad\twoheadleftarrow$  </p>
<pre><code class="language-cpp">$\xleftarrow{left} \xrightarrow{right} \xLeftarrow{Left} \xRightarrow{Right} \xleftrightarrow{left\&amp; right} \xLeftrightarrow{Left\&amp; Right}$</code></pre>
<p>$\quad\xleftarrow{left}\quad \xrightarrow{right} \quad \xLeftarrow{Left} \quad \xRightarrow{Right} \quad \xleftrightarrow{left\&amp; right} \quad \xLeftrightarrow{Left\&amp; Right}$  </p>
<hr/>
<h3>特殊符号</h3>
<pre><code class="language-cpp">$\amalg \% \dagger \ddagger \ldots \cdots$
 ps:\dots和\ldots貌似是一样的。</code></pre>
<p>$\quad\amalg\quad\%\quad\dagger\quad\ddagger\quad\ldots\quad\cdots$  </p>
<pre><code class="language-cpp">$\smile \frown \wr$</code></pre>
<p>$\quad\smile\quad\frown\quad\wr$  </p>
<pre><code class="language-cpp">$\diamondsuit \heartsuit \clubsuit \spadesuit \Game \flat \natural \sharp$</code></pre>
<p>$\quad\diamondsuit\quad\heartsuit\quad\clubsuit\quad\spadesuit\quad\Game\quad\flat\quad\natural\quad\sharp$  </p>
<p>以下是$Wiki$中没有分类的符号，我暂且将其归入特殊符号中  </p>
<pre><code class="language-cpp">$\diagup \diagdown \centerdot \ltimes \rtimes \leftthreetimes \rightthreetimes$</code></pre>
<p>$\quad\diagup\quad\diagdown\quad\centerdot\quad\ltimes\quad\rtimes\quad\leftthreetimes\quad\rightthreetimes$  </p>
<pre><code class="language-cpp">$\eqcirc \circeq \triangleq \bumpeq \Bumpeq \doteqdot \risingdotseq \fallingdotseq$</code></pre>
<p>$\quad\eqcirc\quad\circeq\quad\triangleq\quad\bumpeq\quad\Bumpeq\quad\doteqdot\quad\risingdotseq\quad\fallingdotseq$  </p>
<pre><code class="language-cpp">$\intercal \barwedge \veebar \doublebarwedge \between \pitchfork$</code></pre>
<p>$\quad\intercal\quad\barwedge\quad\veebar\quad\doublebarwedge\quad\between\quad\pitchfork$  </p>
<pre><code class="language-cpp">$\vartriangleleft \ntriangleleft \vartriangleright \ntriangleright$</code></pre>
<p>$\quad\vartriangleleft\quad\ntriangleleft\quad\vartriangleright\quad\ntriangleright$  </p>
<pre><code class="language-cpp">$\trianglelefteq \ntrianglelefteq \trianglerighteq \ntrianglerighteq$</code></pre>
<p>$\quad\trianglelefteq\quad\ntrianglelefteq\quad\trianglerighteq\quad\ntrianglerighteq$  </p>
<pre><code class="language-cpp">$\LaTeX$

 ps:应评论要求加上，其实介于阅读体验还是少用些。</code></pre>
<p>$\quad\LaTeX$</p>
<hr/>
<h3>上标、下标及积分等</h3>
<h4>上标</h4>
<pre><code class="language-cpp">$a^2$</code></pre>
<p>$\quad a^2$  </p>
<h4>下标</h4>
<pre><code class="language-cpp">$a_2$</code></pre>
<p>$\quad a_2$  </p>
<h4>组合</h4>
<pre><code class="language-cpp">$a^{2+2} a_{i,j}$</code></pre>
<p>$\quad a^{2+2}\quad a_{i,j}$  </p>
<h4>结合上下标</h4>
<pre><code class="language-cpp">$a^2_2$</code></pre>
<p>$\quad a^2_2$  </p>
<h4>前置上下标</h4>
<pre><code class="language-cpp">${}^2_1\!X^3_4$
 ps:\!的作用在下面空格一栏有讲述。</code></pre>
<p>$\quad {}^2_1\!X^3_4$  </p>
<h4>导数</h4>
<pre><code class="language-cpp">$ (HTML)x' (PNG)x^\prime (错误)x\prime$</code></pre>
<p>$\quad x'\quad x^\prime\quad x\prime$  </p>
<h4>导数点</h4>
<pre><code class="language-cpp">$\dot{x} \ddot{x}$</code></pre>
<p>$\quad\dot{x}\quad\ddot{x}$  </p>
<h4>向量</h4>
<pre><code class="language-cpp">$\vec{x} \overleftarrow{AB} \overrightarrow{AB} \widehat{AB}$</code></pre>
<p>$\quad\vec{a}\quad\overleftarrow{AB}\quad\overrightarrow{AB}\quad\widehat{AB}$  </p>
<h4>上弧</h4>
<pre><code class="language-cpp">$\overset{\frown}{AB}$
 ps:正确的语法应该是\overarc，但因为没有引入amsmath宏包，所以无法使用，只能用这个替代下。</code></pre>
<p>$\quad\overset{\frown}{AB}$  </p>
<h4>上划线</h4>
<pre><code class="language-cpp">$\overline{ABC}$</code></pre>
<p>$\quad\overline{ABC}$  </p>
<h4>下划线</h4>
<pre><code class="language-cpp">$\underline{ABC}$</code></pre>
<p>$\quad\underline{ABC}$  </p>
<h4>上括号</h4>
<pre><code class="language-cpp">$\overbrace{1+2+\cdots+100}$  

$\begin{matrix}5050\\\overbrace{1+2+\cdots+100}\end{matrix}$  
 ps:'\\'是换行的意思。</code></pre>
<p>$\quad\overbrace{1+2+\cdots+100}$  </p>
<p>$\quad\begin{matrix}5050\\\overbrace{1+2+\cdots+100}\end{matrix}$  </p>
<h4>下括号</h4>
<pre><code class="language-cpp">$\underbrace{1+2+\cdots+100}$  

$\begin{matrix}\underbrace{1+2+\cdots+100}\\5050\end{matrix}$</code></pre>
<p>$\quad\underbrace{1+2+\cdots+100}$  </p>
<p>$\quad\begin{matrix}\underbrace{1+2+\cdots+100}\\5050\end{matrix}$  </p>
<h4>求和</h4>
<pre><code class="language-cpp">$\sum_{i=1}^na_i \sum\limits_{i=1}^na_i$</code></pre>
<p>$\quad\sum_{i=1}^na_i\quad\sum\limits_{i=1}^na_i$  </p>
<h4>求积</h4>
<pre><code class="language-cpp">$\prod_{i=1}^na_i \prod\limits_{i=1}^na_i$</code></pre>
<p>$\quad\prod_{i=1}^na_i\quad\prod\limits_{i=1}^na_i$  </p>
<h4>上积</h4>
<pre><code class="language-cpp">$\coprod_{i=1}^na_i \coprod\limits_{i=1}^na_i$</code></pre>
<p>$\quad\coprod_{i=1}^na_i\quad\coprod\limits_{i=1}^na_i$  </p>
<h4>极限</h4>
<pre><code class="language-cpp">$\lim_{n\to\infty}x_n \lim\limits_{n\to\infty}x_n$</code></pre>
<p>$\quad\lim_{n\to\infty}x_n\quad\lim\limits_{n\to\infty}x_n$  </p>
<h4>积分</h4>
<pre><code class="language-cpp">$\int_{-N}^{N}e^x\,dx$
 ps:\,的作用在下面空格一栏有讲。</code></pre>
<p>$\quad\int_{-N}^{N}e^x\,dx$  </p>
<h4>双重积分</h4>
<pre><code class="language-cpp">$\iint_M^Ndx\,dy$</code></pre>
<p>$\quad\iint_M^Ndx\,dy$  </p>
<h4>三重积分</h4>
<pre><code class="language-cpp">$\iiint_M^Ndx\,dy\,dz$</code></pre>
<p>$\quad\iiint_M^Ndx\,dy\,dz$  </p>
<h4>闭合的曲线、曲面积分</h4>
<pre><code class="language-cpp">$\oint_Cx^3\,dx+4y^2\,dy$</code></pre>
<p>$\quad\oint_Cx^3\,dx+4y^2\,dy$  </p>
<h4>交集</h4>
<pre><code class="language-cpp">$\bigcap_1^np \bigcap\limits_1^np$</code></pre>
<p>$\quad\bigcap_1^np\quad\bigcap\limits_1^np$  </p>
<h4>并集</h4>
<pre><code class="language-cpp">$\bigcup_1^np \bigcup\limits_1^np$</code></pre>
<p>$\quad\bigcup_1^np\quad\bigcup\limits_1^np$  </p>
<hr/>
<h3>分数、矩阵等</h3>
<h4>分数</h4>
<pre><code class="language-cpp">$\frac{1}{2}=0.5$</code></pre>
<p>$\quad\frac{1}{2}=0.5$  </p>
<h4>小型分数</h4>
<pre><code class="language-cpp">$\tfrac{1}{2}=0.5$
 ps:并不清楚为什么洛谷的LaTeX里普通分数和小型分数一样大……</code></pre>
<p>$\quad\tfrac{1}{2}=0.5$  </p>
<h4>大型分数</h4>
<pre><code class="language-cpp">$\dfrac{1}{2}=0.5 \dfrac{1}{x+\dfrac{3}{y+\dfrac{1}{5}}}$</code></pre>
<p>$\quad\dfrac{1}{2}=0.5\qquad\dfrac{1}{x+\dfrac{3}{y+\dfrac{1}{5}}}$  </p>
<h4>二项式系数</h4>
<pre><code class="language-cpp">$\dbinom{n}{m}=\dbinom{n}{n-m}=C_n^m=C_n^{n-m}$</code></pre>
<p>$\quad\dbinom{n}{m}=\dbinom{n}{n-m}=C_n^m=C_n^{n-m}$  </p>
<h4>小型二项式系数</h4>
<pre><code class="language-cpp">$\tbinom{n}{m}=\tbinom{n}{n-m}=C_n^m=C_n^{n-m}$</code></pre>
<p>$\quad\tbinom{n}{m}=\tbinom{n}{n-m}=C_n^m=C_n^{n-m}$  </p>
<pre><code class="language-cpp">$\binom{n}{m}=\binom{n}{n-m}=C_n^m=C_n^{n-m}$</code></pre>
<p>$\quad\binom{n}{m}=\binom{n}{n-m}=C_n^m=C_n^{n-m}$  </p>
<h4>矩阵</h4>
<pre><code class="language-cpp">$\begin{matrix}a&amp;b\\c&amp;d\end{matrix}$
 ps:&amp;是使上下行对齐。</code></pre>
<p>$\quad\begin{matrix}a&amp;b\\c&amp;d\end{matrix}$  </p>
<pre><code class="language-cpp">$\begin{vmatrix}a&amp;b\\c&amp;d\end{vmatrix}$</code></pre>
<p>$\quad\begin{vmatrix}a&amp;b\\c&amp;d\end{vmatrix}$  </p>
<pre><code class="language-cpp">$\begin{Vmatrix}a&amp;b\\c&amp;d\end{Vmatrix}$</code></pre>
<p>$\quad\begin{Vmatrix}a&amp;b\\c&amp;d\end{Vmatrix}$  </p>
<pre><code class="language-cpp">$\begin{bmatrix}a&amp;\cdots&amp;b\\\vdots&amp;\ddots&amp;\vdots\\c&amp;\cdots&amp;d\end{bmatrix}$
 ps:\vdots是竖着3个点，\ddots是斜着3个点。</code></pre>
<p>$\quad\begin{bmatrix}a&amp;\cdots&amp;b\\\vdots&amp;\ddots&amp;\vdots\\c&amp;\cdots&amp;d\end{bmatrix}$  </p>
<pre><code class="language-cpp">$\begin{Bmatrix}a&amp;c\\b&amp;d\end{Bmatrix}$</code></pre>
<p>$\quad\begin{Bmatrix}a&amp;c\\b&amp;d\end{Bmatrix}$  </p>
<pre><code class="language-cpp">$\begin{pmatrix}a&amp;c\\b&amp;d\end{pmatrix}$</code></pre>
<p>$\quad\begin{pmatrix}a&amp;c\\b&amp;d\end{pmatrix}$  </p>
<h4>矩阵嵌套</h4>
<pre><code class="language-cpp">$\begin{vmatrix} \begin{Bmatrix}A &amp; \\ c &amp; d \end{Bmatrix} &amp; x\\ \dfrac{1}{2} &amp; \begin{matrix} 1 &amp; 2 \\ 3 &amp; 4 \end{matrix} \end{vmatrix}$ </code></pre>
<p>$\quad \begin{vmatrix} \begin{Bmatrix}A &amp; \\ c &amp; d \end{Bmatrix} &amp; x\\ \dfrac{1}{2} &amp; \begin{matrix} 1 &amp; 2 \\ 3 &amp; 4 \end{matrix} \end{vmatrix}$  </p>
<h4>条件定义(如分段函数)</h4>
<pre><code class="language-cpp">$f(x)=\begin{cases}x-1&amp;x\leqslant3\\x^2+3x-1&amp;x&gt;3\end{cases}$</code></pre>
<p>$\quad f(x)=\begin{cases}x-1&amp;x\leqslant3\\x^2+3x-1&amp;x&gt;3\end{cases}$  </p>
<h4>方程组</h4>
<pre><code class="language-cpp">$\begin{cases}2x+9y-5z=10\\4x+20y+z=24\\x-\dfrac{1}{2}y+3z=8\end{cases}$</code></pre>
<p>$\quad\begin{cases}2x+9y-5z=10\\4x+20y+z=24\\x-\dfrac{1}{2}y+3z=8\end{cases}$  </p>
<h4>多行等式</h4>
<pre><code class="language-cpp">$\begin{aligned}f(x) &amp; = (x + 1)^2 \\ &amp; = x^2 + 2x + 1\end{aligned}$

$\begin{aligned}a_1 &amp; = 1 \\ a_2 &amp; = 2 \\ &amp; \dots \\ a_n &amp; = n\end{aligned}$ 

 ps:原语法为align，现在是aligned。</code></pre>
<p>$\quad\begin{aligned}f(x) &amp; = (x + 1)^2 \\ &amp; = x^2 + 2x + 1\end{aligned}\qquad\begin{aligned}a_1 &amp; = 1 \\ a_2 &amp; = 2 \\ &amp; \dots \\ a_n &amp; = n\end{aligned}$  </p>
<h4>数组/表格</h4>
<pre><code class="language-cpp">$\begin{array}{|c|c||c|}x&amp;y&amp;z\\8&amp;2&amp;4\\2&amp;3&amp;9\\10&amp;\dfrac{3}{4}&amp;\sqrt{3}\\a&amp;b&amp;c\end{array}$
 ps:\begin{array}{}←这个大括号里是形如'|c|c||c|'这样的格式，'|'是两列的分割线，'c'是表示这里有一列，而内容中使用'&amp;'来分开每一列的内容。这里可能讲的不是很清楚，所以最好还是自己尝试一下。</code></pre>
<p>$\quad\begin{array}{|c|c||c|}x&amp;y&amp;z\\8&amp;2&amp;4\\2&amp;3&amp;9\\10&amp;\dfrac{3}{4}&amp;\sqrt{3}\\a&amp;b&amp;c\end{array}$  </p>
<hr/>
<h3>字体</h3>
<h4>希腊字母</h4>
<p>貌似洛谷对一些希腊字母不支持，也许是因为像英文字母，所以我这里只好用英文字母代替了。  </p>
<pre><code class="language-cpp">$A B\Gamma\Delta EZH\Theta$</code></pre>
<p>$\quad A B\Gamma\Delta EZH\Theta$  </p>
<pre><code class="language-cpp">$IK\Lambda MN\Xi O\Pi$</code></pre>
<p>$\quad IK\Lambda MN\Xi O\Pi$  </p>
<pre><code class="language-cpp">$P\Sigma T\Upsilon\Phi X\Psi\Omega$</code></pre>
<p>$\quad P\Sigma T\Upsilon\Phi X\Psi\Omega$  </p>
<pre><code class="language-cpp">$\alpha\beta\gamma\delta\epsilon\zeta\eta\theta$</code></pre>
<p>$\quad\alpha\beta\gamma\delta\epsilon\zeta\eta\theta$  </p>
<pre><code class="language-cpp">$\iota\kappa\lambda\mu\nu\xi\omicron\pi$</code></pre>
<p>$\quad\iota\kappa\lambda\mu\nu\xi\omicron\pi$  </p>
<pre><code class="language-cpp">$\rho\sigma\tau\upsilon\phi\chi\psi\omega$</code></pre>
<p>$\quad\rho\sigma\tau\upsilon\phi\chi\psi\omega$  </p>
<pre><code class="language-cpp">$\varepsilon\digamma\varkappa\varpi$</code></pre>
<p>$\quad\varepsilon\digamma\varkappa\varpi$  </p>
<pre><code class="language-cpp">$\varrho\varsigma\vartheta\varphi$</code></pre>
<p>$\quad\varrho\varsigma\vartheta\varphi$  </p>
<h4>希伯来符号</h4>
<pre><code class="language-cpp">$\aleph\beth\gimel\daleth$</code></pre>
<p>$\quad\aleph\beth\gimel\daleth$  </p>
<h4>黑板粗体</h4>
<pre><code class="language-cpp">$\mathbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$
 ps:仅支持大写英文字母。</code></pre>
<p>$\quad\mathbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$  </p>
<h4>粗体</h4>
<pre><code class="language-cpp">$\mathbf{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$  
$\mathbf{abcdefghijklmnopqrstuvwxyz}$
$\mathbf{0123456789}$
 ps:支持大小写英文字母、数字和大写希腊字母。</code></pre>
<p>$\quad\mathbf{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$<br/>$\quad\mathbf{abcdefghijklmnopqrstuvwxyz}$<br/>$\quad\mathbf{A B\Gamma\Delta EZH\Theta}$<br/>$\quad\mathbf{IK\Lambda MN\Xi O\Pi}$<br/>$\quad\mathbf{P\Sigma T\Upsilon\Phi X\Psi\Omega}$<br/>$\quad\mathbf{0123456789}$  </p>
<h4>斜体(英文字母和小写希腊字母默认)</h4>
<pre><code class="language-cpp">$\mathit{A B\Gamma\Delta EZH\Theta}$  
$\mathit{IK\Lambda MN\Xi O\Pi}$  
$\mathit{P\Sigma T\Upsilon\Phi X\Psi\Omega}$  
$\mathit{0123456789}$  </code></pre>
<p>$\quad\mathit{A B\Gamma\Delta EZH\Theta}$<br/>$\quad\mathit{IK\Lambda MN\Xi O\Pi}$<br/>$\quad\mathit{P\Sigma T\Upsilon\Phi X\Psi\Omega}$<br/>$\quad\mathit{0123456789}$  </p>
<h4>罗马体</h4>
<pre><code class="language-cpp">$\mathrm{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$  
$\mathrm{abcdefghijklmnopqrstuvwxyz}$  
$\mathrm{0123456789}$
 ps:支持大小写英文字母和数字。</code></pre>
<p>$\quad\mathrm{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$<br/>$\quad\mathrm{abcdefghijklmnopqrstuvwxyz}$<br/>$\quad\mathrm{0123456789}$  </p>
<h4>打字机字体</h4>
<pre><code class="language-cpp">$\mathtt{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$  
$\mathtt{abcdefghijklmnopqrstuvwxyz}$  
$\mathtt{A B\Gamma\Delta EZH\Theta}$  
$\mathtt{IK\Lambda MN\Xi O\Pi}$  
$\mathtt{P\Sigma T\Upsilon\Phi X\Psi\Omega}$  
$\mathtt{0123456789}$  
 ps:支持大小写英文字母、大写希腊字母和数字。</code></pre>
<p>$\quad \mathtt{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$<br/>$\quad \mathtt{abcdefghijklmnopqrstuvwxyz}$<br/>$\quad \mathtt{A B\Gamma\Delta EZH\Theta}$<br/>$\quad \mathtt{IK\Lambda MN\Xi O\Pi}$<br/>$\quad \mathtt{P\Sigma T\Upsilon\Phi X\Psi\Omega}$<br/>$\quad \mathtt{0123456789}$  </p>
<h4>无衬线体</h4>
<pre><code class="language-cpp">$\mathsf{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$  
$\mathsf{abcdefghijklmnopqrstuvwxyz}$  
$\mathsf{A B\Gamma\Delta EZH\Theta}$  
$\mathsf{IK\Lambda MN\Xi O\Pi}$  
$\mathsf{P\Sigma T\Upsilon\Phi X\Psi\Omega}$  
$\mathsf{0123456789}$
 ps:支持大小写英文字母、大写希腊字母和数字。</code></pre>
<p>$\quad\mathsf{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$<br/>$\quad\mathsf{abcdefghijklmnopqrstuvwxyz}$<br/>$\quad\mathsf{A B\Gamma\Delta EZH\Theta}$<br/>$\quad\mathsf{IK\Lambda MN\Xi O\Pi}$<br/>$\quad\mathsf{P\Sigma T\Upsilon\Phi X\Psi\Omega}$<br/>$\quad\mathsf{0123456789}$  </p>
<h4>手写体/花体</h4>
<pre><code class="language-cpp">$\mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$  
$\mathcal{0123456789}$
 ps:支持大写英文字母和数字。</code></pre>
<p>$\quad\mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$<br/>$\quad\mathcal{0123456789}$  </p>
<h4>$Fraktur$体</h4>
<pre><code class="language-cpp">$\mathfrak{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$  
$\mathfrak{abcdefghijklmnopqrstuvwxyz}$  
$\mathfrak{0123456789}$
 ps:支持大小写英文字母和数字。</code></pre>
<p>$\quad\mathfrak{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$<br/>$\quad\mathfrak{abcdefghijklmnopqrstuvwxyz}$<br/>$\quad\mathfrak{0123456789}$  </p>
<h4>小型非斜体字</h4>
<pre><code class="language-cpp">$\scriptstyle\text{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$  
$\scriptstyle\text{abcdefghijklmnopqrstuvwxyz}$  
$\scriptstyle\text{0123456789}$
 ps:支持大小写英文字母和数字，\text见下一栏。</code></pre>
<p>$\quad\scriptstyle\text{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$<br/>$\quad\scriptstyle\text{abcdefghijklmnopqrstuvwxyz}$<br/>$\quad\scriptstyle\text{0123456789}$  </p>
<h4>混合字体</h4>
<h5>斜体字符</h5>
<pre><code class="language-cpp">$x y z$
 ps:忽略公式源码中的空格，要强制空格的看下面空格一栏。</code></pre>
<p>$\quad x y z$  </p>
<h5>非斜体字符</h5>
<pre><code class="language-cpp">$\text{x y z} \text{中文}$
 ps:不会忽略空格，支持大小写英文字母和数字，以及中文。</code></pre>
<p>$\quad\text{x y z}\quad\text{中文}$  </p>
<h5>混合斜体与非斜体</h5>
<pre><code class="language-cpp">$\text{if }n\text{ is even}$
 ps:注意在\text中使用空格来显得更好看，或者可以用强制空格代替。</code></pre>
<p>$\quad\text{if }n\text{ is even}$  </p>
<hr/>
<h3>括号</h3>
<h4>普通括号</h4>
<pre><code class="language-cpp">$(\dfrac{1}{2}) (\dfrac{1}{x+\dfrac{2}{3}})$
 ps:对于较大的式子显得比较难看。</code></pre>
<p>$\quad(\dfrac{1}{2})\qquad(\dfrac{1}{x+\dfrac{2}{3}})$  </p>
<h4>根据式子大小匹配的括号</h4>
<pre><code class="language-cpp">$\left(\dfrac{1}{2}\right) \left(\dfrac{1}{x+\dfrac{2}{3}}\right)$</code></pre>
<p>$\quad\left(\dfrac{1}{2}\right)\qquad\left(\dfrac{1}{x+\dfrac{2}{3}}\right)$<br/>
此功能$($使用\left和\right$)$可以推广到不同的括号：</p>
<h4>圆括号/小括号</h4>
<pre><code class="language-cpp">$\left(\dfrac{1}{2}\right)$</code></pre>
<p>$\quad\left(\dfrac{1}{2}\right)$  </p>
<h4>方括号/中括号</h4>
<pre><code class="language-cpp">$\left[\dfrac{1}{2}\right]$</code></pre>
<p>$\quad\left[\dfrac{1}{2}\right]$  </p>
<h4>花括号/大括号</h4>
<pre><code class="language-cpp">$\left\{\dfrac{1}{2}\right\}$
 ps:注意大括号要用\{和\}。</code></pre>
<p>$\quad\left\{\dfrac{1}{2}\right\}$  </p>
<h4>角括号</h4>
<pre><code class="language-cpp">$\left\langle\dfrac{1}{2}\right\rangle$
 ps:\langle可以用&lt;，\rangle可以用&gt;。</code></pre>
<p>$\quad\left\langle\dfrac{1}{2}\right\rangle$  </p>
<h4>单竖线/绝对值</h4>
<pre><code class="language-cpp">$\left|\dfrac{1}{2}\right|$</code></pre>
<p>$\quad\left|\dfrac{1}{2}\right|$  </p>
<h4>双竖线</h4>
<pre><code class="language-cpp">$\left\|\dfrac{1}{2}\right\|$</code></pre>
<p>$\quad\left\|\dfrac{1}{2}\right\|$  </p>
<h4>向下取整</h4>
<pre><code class="language-cpp">$\left\lfloor\dfrac{1}{2}\right\rfloor$</code></pre>
<p>$\quad\left\lfloor\dfrac{1}{2}\right\rfloor$  </p>
<h4>向上取整</h4>
<pre><code class="language-cpp">$\left\lceil\dfrac{1}{2}\right\rceil$</code></pre>
<p>$\quad\left\lceil\dfrac{1}{2}\right\rceil$  </p>
<h4>斜线</h4>
<pre><code class="language-cpp">$\left/\dfrac{1}{2}\right/$</code></pre>
<p>$\quad\left/\dfrac{1}{2}\right/$  </p>
<h4>反斜线</h4>
<pre><code class="language-cpp">$\left\backslash\dfrac{1}{2}\right\backslash$</code></pre>
<p>$\quad\left\backslash\dfrac{1}{2}\right\backslash$  </p>
<h4>上下箭头</h4>
<pre><code class="language-cpp">$\left\uparrow\dfrac{1}{2}\right\uparrow$</code></pre>
<p>$\quad\left\uparrow\dfrac{1}{2}\right\uparrow$  </p>
<pre><code class="language-cpp">$\left\Downarrow\dfrac{1}{2}\right\Downarrow$</code></pre>
<p>$\quad\left\Downarrow\dfrac{1}{2}\right\Downarrow$  </p>
<pre><code class="language-cpp">$\left\updownarrow\dfrac{1}{2}\right\updownarrow$</code></pre>
<p>$\quad\left\updownarrow\dfrac{1}{2}\right\updownarrow$<br/>
因为上下箭头太多了，这里就不一一示范了<del>（其实是我懒</del>。  </p>
<h4>混合括号</h4>
<p>其实上述括号都可以混合使用，这里就随便列两个了。  </p>
<pre><code class="language-cpp">$\left&lt;\dfrac{1}{2}\right/$</code></pre>
<p>$\quad\left&lt;\dfrac{1}{2}\right/$  </p>
<pre><code class="language-cpp">$\left(\dfrac{1}{2},1\right]$</code></pre>
<p>$\quad\left(\dfrac{1}{2},1\right]$  </p>
<h4>单左括号</h4>
<p>上述括号都适用，这里就随便列一个。  </p>
<pre><code class="language-cpp">$\left(\dfrac{1}{2}\right.$</code></pre>
<p>$\quad\left(\dfrac{1}{2}\right.$  </p>
<h4>单右括号</h4>
<p>同上。  </p>
<pre><code class="language-cpp">$\left.\dfrac{1}{2}\right]$</code></pre>
<p>$\quad\left.\dfrac{1}{2}\right]$  </p>
<h4>强制括号大小</h4>
<pre><code class="language-cpp">$\Bigg(\bigg[\Big\{\big&lt;x\big&gt;\Big\}\bigg]\Bigg)$
 ps:即使用\Bigg、\bigg、\Big、\big来控制括号大小。</code></pre>
<p>$\quad\Bigg(\bigg[\Big\{\big&lt;x\big&gt;\Big\}\bigg]\Bigg)$  </p>
<hr/>
<h3>空格</h3>
<p>一般$LaTeX$能自动处理大多数空格，但必要时候需要强制控制大小。  </p>
<h4>紧贴</h4>
<pre><code class="language-cpp">$x\!y$</code></pre>
<p>$\quad x\!y$<br/>
宽度为$-\frac{m}{6}$  </p>
<h4>无空格</h4>
<pre><code class="language-cpp">$xy$</code></pre>
<p>$\quad xy$<br/>
宽度为$0$  </p>
<h4>小空格</h4>
<pre><code class="language-cpp">$x\,y$</code></pre>
<p>$\quad x\,y$<br/>
宽度为$\frac{m}{6}$  </p>
<h4>中等空格</h4>
<pre><code class="language-cpp">$x\;y$</code></pre>
<p>$\quad x\;y$<br/>
宽度为$\frac{2m}{7}$  </p>
<h4>大空格</h4>
<pre><code class="language-cpp">$x\ y$</code></pre>
<p>$\quad x\ y$<br/>
宽度为$\frac{m}{3}$  </p>
<h4>$quad$空格</h4>
<pre><code class="language-cpp">$x\quad y$</code></pre>
<p>$\quad x\quad y$<br/>
宽度为$m$  </p>
<h4>两个$quad$空格</h4>
<pre><code class="language-cpp">$x\qquad y$</code></pre>
<p>$\quad x\qquad y$<br/>
宽度为$2m$  </p>
<hr/>
<h3>颜色</h3>
<h4>语法</h4>
<p>字体颜色：{\color{色调}表达式}<br/>
背景颜色：{\color{文字色调}\colorbox{背景色调}{表达式(可以打中文)}}</p>
<h4>洛谷内支持的颜色(洛谷里有挺多颜色是不支持的，而且有些颜色和$Wiki$上不太一样……)</h4>
<p>${\color{Aquamarine}Aquamarine}$<br/>${\color{Black}Black}$<br/>${\color{Blue}Blue}$<br/>${\color{BlueViolet}BlueViolet}$<br/>${\color{Brown}Brown}$<br/>${\color{CadetBlue}CadetBlue}$<br/>${\color{CornflowerBlue}CornflowerBlue}$<br/>${\color{Cyan}Cyan}$<br/>${\color{DarkOrchid}DarkOrchid}$<br/>${\color{ForestGreen}ForestGreen}$<br/>${\color{Fuchsia}Fuchsia}$<br/>${\color{Goldenrod}Goldenrod}$<br/>${\color{Gold}Gold}$<br/>${\color{Gray}Gray}$<br/>${\color{CadetBlue}CadetBlue}$<br/>${\color{Green}Green}$<br/>${\color{GreenYellow}GreenYellow}$<br/>${\color{Lavender}Lavender}$<br/>${\color{LimeGreen}LimeGreen}$<br/>${\color{Magenta}Magenta}$<br/>${\color{Maroon}Maroon}$<br/>${\color{Orange}Orange}$<br/>${\color{OrangeRed}OrangeRed}$<br/>${\color{Orchid}Orchid}$<br/>${\color{Plum}Plum}$<br/>${\color{Purple}Purple}$<br/>${\color{Red}Red}$<br/>${\color{RoyalBlue}RoyalBlue}$<br/>${\color{Salmon}Salmon}$<br/>${\color{SeaGreen}SeaGreen}$<br/>${\color{SkyBlue}SkyBlue}$<br/>${\color{SpringGreen}SpringGreen}$<br/>${\color{Tan}Tan}$<br/>${\color{Thistle}Thistle}$<br/>${\color{Turquoise}Turquoise }$<br/>${\color{Violet}Violet}$<br/>${\color{White}White}\gets$这是白= =<br/>${\color{Yellow}Yellow}$<br/>${\color{YellowGreen}YellowGreen}$<br/>
随便举个例子：  </p>
<pre><code class="language-cpp">$x=\dfrac{-b\pm\sqrt{\color{Red}b^2-4ac}}{\color{Blue}2a}$</code></pre>
<p>$\quad x=\dfrac{-b\pm\sqrt{\color{Red}b^2-4ac}}{\color{Blue}2a}$  </p>
<pre><code class="language-cpp">$\color{Blue}\colorbox{Yellow}{LaTeX公式大全}$</code></pre>
<p>$\quad\color{Blue}\colorbox{Yellow}{LaTeX公式大全}$  </p>
<hr/>
<h3>把数学公式框起来</h3>
<pre><code class="language-cpp">$$\boxed{\sum\limits_{i = 1}^{n} i = \dfrac{n(n - 1)}{2}}$$

 ps:对于行内模式同样有效，不过大多情况用于独立模式。</code></pre>
<p>$$\boxed{\sum\limits_{i = 1}^{n} i = \dfrac{n(n - 1)}{2}}$$</p>
<hr/>
<h1>$End$</h1>
<p>历时快半个月了，终究还是断断续续完成了，中间一次大改是真的伤，不过自己开的坑总要填完啊。不过因为纯手打的关系，总会有些小错误，如果有还请在评论区留言，谢谢！</p>
<script defer src="./katex.min.js" integrity="sha384-XjKyOOlGwcjNTAIQHIpgOno0Hl1YQqzUOEleOLALmuqehneUG+vnGctmUb0ZY0l8" crossorigin="anonymous"></script>
<script defer src="./auto-render.min.js" integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
<script>
  window.WebFontConfig = {
    custom: {
      families: ['KaTeX_AMS', 'KaTeX_Caligraphic:n4,n7', 'KaTeX_Fraktur:n4,n7',
        'KaTeX_Main:n4,n7,i4,i7', 'KaTeX_Math:i4,i7', 'KaTeX_Script',
        'KaTeX_SansSerif:n4,n7,i4', 'KaTeX_Size1', 'KaTeX_Size2', 'KaTeX_Size3',
        'KaTeX_Size4', 'KaTeX_Typewriter'],
    },
  };
</script>
<script>
    document.addEventListener("DOMContentLoaded", function() {
        renderMathInElement(document.body, {
          // customised options
          // • auto-render specific keys, e.g.:
          delimiters: [
              {left: '$$', right: '$$', display: true},
              {left: '$', right: '$', display: false},
              {left: '\\(', right: '\\)', display: false},
              {left: '\\[', right: '\\]', display: true}
          ],
          // • rendering keys, e.g.:
          throwOnError : false
        });
    });
</script>
</body>
</html>